import request from '@/utils/request'

const api_name = '/hr/service/register'

export default {
  get_register_page(current, limit, registerQuery) {
    return request({
      url: `${api_name}/registers/${current}/${limit}`,
      method: 'post',
      data: registerQuery
    })
  },
  get_register(id) {
    return request({
      url: `${api_name}/register`,
      method: 'get',
      params: { id }
    })
  },
  add_register(register) {
    return request({
      url: `${api_name}/register`,
      method: 'post',
      data: register
    })
  },
  update_register(register) {
    return request({
      url: `${api_name}/register`,
      method: 'put',
      data: register
    })
  },
  delete_register(id) {
    return request({
      url: `${api_name}/register/${id}`,
      method: 'delete'
    })
  },
  publish_register(id, pass) {
    return request({
      url: `${api_name}/publish/${id}/${pass}`,
      method: 'put'
    })
  },
  print_register_detail(jobId) {
    return request({
      url: `${api_name}/print/${jobId}`,
      method: 'get'
    })
  }
}
